function onDelete(rid) {

}

function onStat(){
	  $('#modalTable').modal('show');
	  var url =  _ctx + "/alarm/alarmhist/stat";
	  var str = '';
	  $.getJSON(url,{btimes:$("#btimes").val(),etimes:$("#etimes").val(),timetype:$('input[name="timetype"]:checked').val()},function(data){
		 if (data.length>0){
		   str = str + "<tr>";
	       str = str + "<td width=\"50%\" style=\"font-size:14px;height:45px;\" align=\"right\">开始时间：<td>";
	       str = str + "<td width=\"50%\" style=\"font-size:14px;\" align=\"center\">"+$("#btimes").val()+"<td>";
	       str = str + "</tr>";
		   str = str + "<tr>";
	       str = str + "<td width=\"50%\" style=\"font-size:14px;height:45px;\" align=\"right\">结束时间：<td>";
	       str = str + "<td width=\"50%\" style=\"font-size:14px;\" align=\"center\">"+$("#etimes").val()+"<td>";
	       str = str + "</tr>";	       
	     }
		 for (var i=0; i<data.length; i++){
		   str = str + "<tr>";
	       str = str + "<td width=\"50%\" style=\"font-size:14px;height:45px;\" align=\"right\">"+data[i].severity+"：<td>";
	       str = str + "<td width=\"50%\" style=\"font-size:14px;\" align=\"center\">"+data[i].cnt+"<td>";
	       str = str + "</tr>";
		 }
		 $('#innerTr').html(str);
	  });	
}

$(document).ready(function() {
	//doValidate('searchForm');
	
	$('.emsTimePicker').datetimepicker({
	     format: 'yyyy-mm-dd hh:ii',
	     autoclose:true
	 });
	
	
	$('html').attr('style','overflow-x:scroll;overflow-y:scroll;');
	
//	$('.pagination>li>a').click(function(){
//		$("#pageNo").val($(this).html());
//		$("#btn_query").trigger("click");
//	 });
	
//	  $('#datetimepicker').datetimepicker({
//	        format: 'yyyy-MM-dd hh:mm',
//	        language: 'en',
//	        pickDate: true,
//	        pickTime: true,
//	        hourStep: 1,
//	        minuteStep: 15,
//	        secondStep: 30,
//	        DataBindings: true,
//	        inputMask: true
//	  });	
//	  
//	  $('#datetimepicker1').datetimepicker({
//	        format: 'yyyy-MM-dd hh:mm',
//	        language: 'en',
//	        pickDate: true,
//	        pickTime: true,
//	        hourStep: 1,
//	        minuteStep: 15,
//	        secondStep: 30,
//	        DataBindings : true,
//	        inputMask: true
//	  });	  
	  
	    $("#neSel").change(function(){
	        var url = _ctx + "/alarm/alarmprop/getUseCardSlot";
	        var optionstr = '<option value="0" selected>ALL</option>';
			$.getJSON(url,{neid:$("#neSel").val()},function(data){
				//var json = eval('(' + data + ')');
				for (var i=0; i<data.length; i++){
					optionstr = optionstr + "<option value="+data[i].cardid+">"+data[i].num+":"+data[i].cardtype+"</option>";
				}
				$("#slotSel").html(optionstr);
			});
	    });  
});